package com.hyopt.common.utils;

import com.alibaba.fastjson.JSONObject;

import java.math.BigDecimal;

/**
 * TODO 常量
 *
 * @author crazypenguin
 * @version 1.0.0
 * @createdate 2019/1/2
 */
public class Constant {

	/**
	 * 初始密码
	 */
	public static final String GOODS_PUT = "goods_put";
	/**
	 * 超管ID,写死
	 */
	public static final int SUPER_ADMIN = 1;

	/**
	 * 项目信息配置存取路径
	 */
	public static final String SYS_PUT = "D:/hy/img/sys/";

	/**
	 * 项目信息配置存取路径
	 */
	public static final String USER_PUT = "D:/hy/img/user/";

	/**
	 * 项目信息配置存取路径
	 */
	public static final String ALARM = "D:/hy/img/alarm/";
	interface Path {
		//
		String SYS_PUT = "D:/hy/img/sys/";
		// 用户头像存取路径
		String USER_PUT = "D:/hy/img/user/";
		// 报警对象存取路径
		String ALARM = "D:/hy/img/alarm/";
	}

  /**
   * 报警状态类型
   */
  public enum AlarmStatus {
    HANDLED(0),  //已处理
    UNHANDLED(1);     // 未处理

    private int value;

    AlarmStatus(int value) {
      this.value = value;
    }

    public int getValue() {
      return value;
    }
  }

	/**
	 * 历史报警查询默认日期
	 */
	public static final Integer HISTORY_SEARCH_DAY = 30;

	/**
	 * 统计报警查询默认日期
	 */
	public static final Integer COUNT_SEARCH_DAY = 7;

	/**
	 * 菜单类型
	 */
	public enum MenuType {
		CATALOG(0),  // 目录
		MENU(1),     // 菜单
		BUTTON(2);   // 按钮

		private int value;

		MenuType(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}
	}

	/**
	 * 定时任务状态
	 */
	public enum ScheduleStatus {
		NORMAL(0),  // 正常
		PAUSE(1);   // 暂停

		private int value;

		ScheduleStatus(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}
	}

	/**
	 * 定时任务状态
	 */
	public enum PayType {
		ZERO(0),  // 0元购
		WECHAT(1),   // 微信
		ZHIFUBAO(2);  // 支付宝

		private int value;

		PayType(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}
	}

	/**
	 * 商家角色
	 */
	public static final Long SELLER_ROLE = 3L;

	/**
	 * 初始密码
	 */
	public static final String DEFAULT_PWD = "123456";

	/**
	 * 短信验证码code的前缀
	 */
	public static final String DEFAULT_CODE_KEY = "HEYOOVR_MALL_SMS_CODE_KEY";

	/**
	 * 砍价购
	 */
	public static final String BARGAIN_CODE_KEY = "HEYOOVR_BARGAIN_CODE_KEY";


	/**
	 * 短信验证码默认时长 60秒
	 */
	public static final long SMS_CODE_EXPIRE = 60;

	// 验证码发送失败
	public static final int SMS_ABNORMAL = 0;

	// 验证码发送正常
	public static final int SMS_NORMAL = 1;

	// APP注册用户默认头像
	public static final String APP_DEFAULT_HEADIMG = "http://videoapp-1253520711.coscd.myqcloud.com/headimg/head2.png";

	// 三方登录mobile默认unbind
	public static final String UNBIND = "unbind";

	/**
	 * 砍价订单状态类型
	 */
	public enum BargainOrderStatus {
		STATUS_END(0),//砍价结束
		STATUS_BARGAIN(1),//砍价中
		STATUS_USED(2);//砍价已使用

		private int value;

		BargainOrderStatus(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}
	}

	/**
	 * 短信模板
	 */
	public static final int SMS_TMP_YZM = 274612;           // 验证码
	public static final int SMS_TMP_PAY_USER = 274638;      // 订单支付成功通知会员
	public static final int SMS_TMP_PAY_USER_CODE = 300414;      // 订单支付成功通知会员
	public static final int SMS_TMP_PAY_SELLER = 274643;    // 订单支付成功通知商家
	public static final int SMS_TMP_SEND = 274647;          // 订单发货通知会员
	public static final int SMS_TMP_CHECKED = 274665;       // 订单核销通知商家
	public static final int SMS_TMP_SEND_KUAIDI = 286544;   // 订单发货通知会员,包括快递单号

	public static final JSONObject SMS_WX_MAP = JSONObject.parseObject("{'0':'积分口袋','26':'jiabomashu2018'}");

	// 短信应用SDK AppID
	public static int SMS_APP_ID = 1400184031;

	// 短信应用SDK AppKey
	public static final String SMS_APP_KEY = "10e905a507ed953c2f51325a3942332e";

	// 短信应用签名
	public static final String SMS_APP_SIGNKEY = "";


	public static final String WX_SHOP_KEY = "Hey00vr2019o12900000123456crazYY";
	//    public static final String WX_APP_ID = "wx16f8bc462258ffb2";
//    public static final String WX_APP_SECRET = "c07783ec58b15bbeebe9d3ba1f2d91e0";
	public static final String WX_SHOP_MCHID = "1525059031";
	public static final String WX_OPENID_URL = "https://api.weixin.qq.com/sns/jscode2session?";
	public static final String WX_ORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
	public static final String WX_CALLBACK_URL = "https://www.heyoo-shop.com/hylite/app/wx/payResult";
	public static final String WX_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token";
	public static final String WXA_GETWXACODEUNLIMIT_URL = "https://api.weixin.qq.com/wxa/getwxacodeunlimit";
	public static final String WX_KF_SEND = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=";

	//微信支付回调成功返回
	public static final String WX_PAY_NOTIFY_RETURN_XML_OK = "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
	/**
	 * redis缓存的微信token的前缀
	 */
	public static final String WX_TOKEN_KEY = "HEYOOVR_WX_TOKEN_KEY";


	public static final BigDecimal HONGBAO_RATE = new BigDecimal(100);

	/**
	 * 基楚状态
	 */
	public enum BasicStatus {
		FLASE(0),  // 否
		TRUE(1);   // 是

		private int value;

		BasicStatus(int value) {
			this.value = value;
		}

		public int getValue() {
			return value;
		}
	}
}
